#ifndef AVALON_UIDDATASTORE_HPP
#define AVALON_UIDDATASTORE_HPP
#include "Avalon/IO/ClientConnection.hpp"
#include "Avalon/UidService/UidService.hpp"

namespace Avalon {
namespace UidService {

  /*! \class UidDataStore
   *  \brief Base class used to manage UIDs.
   *  \author Kamal Mansouri <kranar@hotmail.com>
   */
  class UidDataStore : public IO::ClientConnection {
    public:

      virtual ~UidDataStore();

      //! Returns the next available UID.
      virtual long long GetNextUid() = 0;

      //! Reserves a block of UIDs.
      /*!
        \param size The size of the UID block to reserve.
        \return The first UID in the reserved block.
      */
      virtual long long Reserve(long long size) = 0;
  };
}
}

#endif // AVALON_UIDDATASTORE_HPP
